<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <!-- 
    v-text v-html
    相当于js的innerText innerHTML
    v-text可以插入文本，v-html可以插入标签等内容
    这两个不如{{}}用起来灵活

    指令的使用方法
    <标签 v-*=""></标签>
  -->
  <div id="app">
    {{msg}}
    <br>
    <span>内容 {{msg}}</span>
    <br>
    <span v-text="msg">内容</span>
    <br>
    <span v-html="msg"></span>

  </div>

  <script src="./vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        msg: '<em>Hello World</em>'
      }
    })
    
  </script>
</body>
</html>